//
//  AboTool.h
//  AFNetworking
//
//  Created by 李长春 on 2022/5/12.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface AboTool : NSObject

//获取UA
+(void)getUserAgentForGame;
//string to dict
+(NSDictionary *)parseJSONStringToNSDictionary:(NSString *)JSONString;
//获取idfa
+ (NSString*) sameDayOpenIDFA;
+ (NSArray*) threeDaysOpenIDFAArray;
//获取系统的原生idfa
+(NSString *)getSystemIDFA;
//获取UUID
+(NSString *)handleUUID;
#pragma mark - 获取设备的model
+ (NSString *)getCurrentDeviceModeYzhi;
#pragma mark - 存储keychain操作
/** 存储kvalue 使用的是私有的idfa id为他的key */
+(void)saveStringInKeyChains:(NSString*)value WithKey:(NSString *)keyString;
/** 根据目前已经 有的key  来取到value */
+(NSString *)readStringWithKey:(NSString *)key;
#pragma mark - 获取设备的运营商
+ (NSString *)getCarrierInfo;
#pragma mark - 获取设备的运营商IMSI码
+ (NSString *)getIMSI;
#pragma mark - 是否是模拟器
+(NSNumber*)GetIsSimulator;
#pragma mark - 设备是否越狱
+(NSNumber*)deviceIsJailBroken;
//设备是否越狱
+(BOOL)isJailBreak;
#pragma mark - 获取mac地址
+ (NSString *) macaddress;
+(NSString *)getMacAddress;

#pragma mark - 获取网络类型
+ (NSString *)getNetconnType;

#pragma mark - 获取手机信息
+ (NSString *)getOSVersion;
+ (NSString *)getphoneModel;
+ (NSString *)getCurrentDeviceSystemType;
#pragma mark - 获取language
+(NSString*)getLanguage;
#pragma mark - 获取当前包体
+ (NSString *)getAppVersion;
#pragma mark - 获取包名
+ (NSString *)getBundleIndetifier;
#pragma mark - 获取时间戳(秒级)
+ (NSString *)getCurrentTimeStamp;
#pragma mark - 获取时间戳(毫秒级)
+ (NSString *)getCurrentTimeStamp1000;
+ (NSString *)getCurrentTimeStampSytleIsYMS;
#pragma mark - 字典转json
+ (NSString*)dictionaryToJson:(NSDictionary *)dic;

#pragma mark - sign
//把NSDictionary解析成post格式的NSString字符串
+ (NSString *)parseParams:(NSDictionary *)params;

+(NSString *)md5:(NSString *)str;

#pragma mark --- 将Dictionary转为NSData
+ (NSData *)CompactFormatDataForDictionary:(NSDictionary *)dicJson;
#pragma mark --- 将二进制数据转换成字典
+ (NSDictionary *)DictionaryForJsonData:(NSData *)jsonData;

#pragma mark --- appsflyer标签处理

//正常登录前收到回调
+(void)AppsFlyerConversionDataSuccess:(NSDictionary*)conversionInfo;

//登录前处理
+(void)BeforeLoginaboutConversionData;

#pragma mark --- 登录前联系客服地址
+(NSURL*)GetBeforeLoginFAQsUrl:(NSString*)pathString;
#pragma mark --- 获取客服 、  工单地址
+(NSURL*)GetFAQsUrl:(NSString*)pathString;



//获取bundle文件的图片
+(UIImage*)GetImageWithName:(NSString*)name;

+(NSData *)dataByAes256CBC:(NSData *)data key:(NSString *)key iv:(NSString *)iv;

#pragma mark --- 获取keywindow
+(UIWindow*)getKeyWindow;
#pragma mark --- 获取顶部安全区域高度
+(CGFloat)getTopSafeHeight;
#pragma mark --- 获取顶部安全区域高度 忽略状态栏
+(CGFloat)getTopSafeHeightNotStatusBar;
#pragma mark --- 获取底部安全区域高度
+(CGFloat)getBottomSafeHeight;
@end

NS_ASSUME_NONNULL_END
